<div class="slide-dialog-header">
	<h2>{{title}}</h2>
	<div class="slide-dialog-toolbar">
		<ul>
			<li><span class="ui-btn slide-dialog-close" ng-click="close(false)"><i class="fa fa-remove"></i></span></li>
		</ul>
	</div>
</div>
<div class="slide-dialog-body x-slide-dialog-body">
	<div class="x-data-panel-fixed">
		<form name="form" novalidate="novalidate" ng-submit="submit(form.$valid);">
			<div class="x-data-panel-body">
				<uib-tabset active="active">
					<uib-tab index="0" heading="指标目录">
						<div class="data-form">
							<!-- <dl>
								<dt><span class="x-star">*</span>模型分类：</dt>
								<dd>
									<select name="type" ng-model="data.type" required><option value="">请选择分类</option></select>
									<div class="x-error" ng-if="interacted(form.type)" ng-messages="form.type.$error">
										<span ng-message="required">分类名称不能为空</span>
									</div>
								</dd>
							</dl> -->
							<!-- <dl>
								<dt><span class="x-star">*</span>公开属性：</dt>
								<dd>
									<select name="public" ng-model="data.public" required><option value="">请选择</option><option value="1">公开信息</option><option value="2">依授权查询信息</option><option value="3">不公开</option></select>
									<div class="x-error" ng-if="interacted(form.public)" ng-messages="form.public.$error">
										<span ng-message="required">请选择公开属性</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>共享：</dt>
								<dd>
									<select name="share" ng-model="data.share" required><option value="">请选择</option><option value="1">共享</option><option value="2">协议共享</option></select>
									<div class="x-error" ng-if="interacted(form.share)" ng-messages="form.share.$error">
										<span ng-message="required">请选择共享方式</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>有效期限：</dt>
								<dd>
									<input type="text" name="limit" ng-model="data.limit" class="x-ipt" placeholder="请输入有效期限" required />
									<div class="x-error" ng-if="interacted(form.limit)" ng-messages="form.limit.$error">
										<span ng-message="required">有效期限不能为空</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>提供周期：</dt>
								<dd>
									<select name="public" ng-model="data.public" required><option value="">请选择</option><option value="1">实时</option><option value="2">每月</option><option value="3">每季度</option><option value="4">半年</option></select>
									<div class="x-error" ng-if="interacted(form.public)" ng-messages="form.public.$error">
										<span ng-message="required">请选择提供周期</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>更新频率：</dt>
								<dd>
									<select name="public" ng-model="data.public" required><option value="">请选择</option><option value="1">实时</option><option value="2">每日</option><option value="3">每周</option><option value="4">每月</option><option value="5">每季度</option><option value="6">每半年</option><option value="7">每年</option></select>
									<div class="x-error" ng-if="interacted(form.public)" ng-messages="form.public.$error">
										<span ng-message="required">请选择更新频率</span>
									</div>
								</dd>
							</dl> -->
							<dl>
								<dt><span class="x-star">*</span>表名称：</dt>
								<dd>
									<input type="text" name="cubeCode" ng-model="data.cubeCode" class="x-ipt" ng-disabled="data.id" placeholder="请输入表名称" required ng-pattern="/^[a-zA-Z0-9_]+$/"/>
									<div class="x-error" ng-if="interacted(form.cubeCode)" ng-messages="form.cubeCode.$error">
										<span ng-message="required">表名称不能为空</span>
										<span ng-message="pattern">不能输入中文或特殊字符</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>表中文名称：</dt>
								<dd>
									<input type="text" name="cubeNameCn" ng-model="data.cubeNameCn" class="x-ipt" ng-disabled="data.id" placeholder="请输入表中文名称" required />
									<div class="x-error" ng-if="interacted(form.cubeNameCn)" ng-messages="form.cubeNameCn.$error">
										<span ng-message="required">表中文名称不能为空</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>显示样式：</dt>
								<dd>
									<select name="style" ng-model="data.style" ng-options="key|int as value for (key,value) in options.styles" required>
										<option value="">请选择显示样式</option>
									</select>
									<div class="x-error" ng-if="interacted(form.style)" ng-messages="form.style.$error">
										<span ng-message="required">显示样式不能为空</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>开放等级：</dt>
								<dd>
									<select name="openGrade" ng-model="data.openGrade" ng-options="key as value for (key,value) in options.openGrades" required>
										<option value="">请选择开放等级</option>
									</select>
									<div class="x-error" ng-if="interacted(form.openGrade)" ng-messages="form.openGrade.$error">
										<span ng-message="required">开放等级不能为空</span>
									</div>
								</dd>
							</dl>
							<dl>
								<dt><span class="x-star">*</span>更新周期：</dt>
								<dd>
									<select name="updateCycle" ng-model="data.updateCycle" ng-options="key as value for (key,value) in options.updateCycles" required>
										<option value="">请选择更新周期</option>
									</select>
									<div class="x-error" ng-if="interacted(form.updateCycle)" ng-messages="form.updateCycle.$error">
										<span ng-message="required">更新周期不能为空</span>
									</div>
								</dd>
							</dl>
						</div>
					</uib-tab>
					<uib-tab index="1" heading="所属分类">
						<div kendo-tree-view="$parent.$parent.tree" k-options="treeOptions">
			                <span class="k-node" k-template>
			                    <i class="fa fa-{{dataItem.className || 'folder-open'}}"></i> {{dataItem.text}}
			                </span>
						</div>
					</uib-tab>
				</uib-tabset>
			</div>
			<div class="x-data-panel-footer">
				<button class="dialog-button cancel-button" type="button" ng-click="close(false)">取消</button><button class="dialog-button" type="submit" ng-disabled="formDisabled">提交</button>
			</div>
		</form>
	</div>
</div>